منابع مشابه
Quicksort Revisited - Verifying Alternative Versions of Quicksort
We verify the correctness of a recursive version of Tony Hoare’s quicksort algorithm using the Hoare-logic based verification tool Dafny. We then develop a non-standard, iterative version which is based on a stack of pivot-locations rather than the standard stack of ranges. We outline an incomplete Dafny proof for the latter.
متن کاملQuicksort asymptotics
The number of comparisons Xn used by Quicksort to sort an array of n distinct numbers has mean μn of order n log n and standard deviation of order n. Using different methods, Régnier and Rösler each showed that the normalized variate Yn := (Xn−μn)/n converges in distribution, say to Y ; the distribution of Y can be characterized as the unique fixed point with zero mean of a certain distribution...
متن کاملQuicksort Algorithm Again Revisited
We consider the standard Quicksort algorithm that sorts n distinct keys with all possible n! orderings of keys being equally likely. Equivalently, we analyze the total path length n in a randomly built binary search tree. Obtaining the limiting distribution of n is still an outstanding open problem. In this paper, we establish an integral equation for the probability density of the number of co...
متن کاملLecture Notes on Quicksort
In this lecture we consider two related algorithms for sorting that achieve a much better running time than the selection sort from last lecture: mergesort and quicksort. We developed quicksort and its invariants in detail. As usual, contracts and loop invariants will bridge the gap between the abstract idea of the algorithm and its implementation. We will revisit many of the computational thin...
متن کاملDual pivot Quicksort
In this paper, we analyse the dual pivot Quicksort, a variant of the standard Quicksort algorithm, in which two pivots are used for the partitioning of the array. We are solving recurrences of the expected number of key comparisons and exchanges performed by the algorithm, obtaining the exact and asymptotic total average values contributing to its time complexity. Further, we compute the averag...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: The Computer Journal
سال: 1962
ISSN: 0010-4620,1460-2067
DOI: 10.1093/comjnl/5.1.10